#ifndef TAGHANDLER_H
#define TAGHANDLER_H

#include <QFileInfo>
#include <QFile>
#include <QDir>

#include <taglib/tag.h>
#include <taglib/fileref.h>
#include <taglib/audioproperties.h>
#include <taglib/unsynchronizedlyricsframe.h>

#include <taglib/mpegfile.h>

#include <taglib/id3v2tag.h>
#include <taglib/id3v2frame.h>
#include <taglib/id3v2header.h>

#include <taglib/id3v1tag.h>

#include <taglib/apetag.h>

class TagHandler
{
public:
    TagLib::Tag *tag;
    TagLib::AudioProperties *properties;
    TagLib::ID3v2::UnsynchronizedLyricsFrame *lyrFrame;
    TagLib::ID3v2::Tag *id3v2tag;

    QString path;
    bool isPathTemp;
    QString tmpPath;
    QFile file;

    TagHandler();
    bool loadPath(QString path);
    QString getTitle();
    QString getArtist();
    QString getAlbum();
    QString getAlbumArtist();
    QString getGenre();
    QString getComposer();
    QString getLabel();
    int getYear();
    int getTrack();
    int getLength();
    int getBitrate();
    QString getComment();
    QString getDisc();
    int getChannel();
    int getFreq();
    QString getBpm();

    QString getLyrics();

    void setArtist(QString artist);
    void setTitle(QString title);
    void setAlbum(QString album);
    void setAlbumArtist(QString albumArtist);
    void setGenre(QString genre);
    void setComposer(QString composer);
    void setLabel(QString label);
    void setComment(QString comment);
    void setDisc(QString disc);
    void setPuid(QString puid);
    void setLyrics(QString lyrics);
    void setTrack(int track);
    void setYear(int year);
};

#endif // TAGHANDLER_H
